home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 10410 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.6 KB

  1. Path: wmwap1.math.uni-wuppertal.de!usenet
  2. From: Oliver Heinz <heinz@lfa.uni-wuppertal.de>
  3. Newsgroups: comp.lang.c++
  4. Subject: Operator overloading
  5. Date: Thu, 07 Mar 1996 18:15:33 +0100
  6. Organization: University of Wuppertal, Germany
  7. Message-ID: <313F19B5.41C6@lfa.uni-wuppertal.de>
  8. NNTP-Posting-Host: welfag.elektro.uni-wuppertal.de
  9. Mime-Version: 1.0
  10. Content-Type: multipart/mixed; boundary="------------167E2781446B"
  11. X-Mailer: Mozilla 2.0 (X11; I; IRIX 5.3 IP20)
  12. CC: heinz@lfa.uni-wuppertal.de
  13.  
  14. This is a multi-part message in MIME format.
  15.  
  16. --------------167E2781446B
  17. Content-Type: text/plain; charset=iso-8859-2
  18. Content-Transfer-Encoding: 7bit
  19.  
  20. Hello out there, 
  21.  
  22. can somebody explain to me this strange looking operator overloading:
  23.  
  24. const T& operator[](unsigned long int index) const;
  25.  
  26. I know, it is an subscription overloading, for something like 
  27. v[i], where i is of type unsigned long int and v of type T.
  28.  
  29. What's the meaning of the const at the end 
  30. and the beginning of the line ?
  31.  
  32. Any help is greatly appreciated, thanks in advance ...
  33.  
  34. Oliver
  35.  
  36. --------------167E2781446B
  37. Content-Type: text/plain; charset=iso-8859-2
  38. Content-Transfer-Encoding: 7bit
  39. Content-Disposition: inline; filename="absender"
  40.  
  41. ============================================================================
  42. Oliver Heinz                            |    E-mail: 
  43. University of Wuppertal                 |    heinz@lfa.uni-wuppertal.de
  44. Department of Electrical Engineering    |
  45. Fuhlrottstr. 10                         |
  46. D-42110 Wuppertal, GERMANY              |
  47. ============================================================================
  48.  
  49. --------------167E2781446B--
  50.  
  51.